package com.xszx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName t_assettype
 */
@TableName(value ="t_assettype")
@Data
public class TAssettype implements Serializable {
    /**
     * 资产类型id
     */
    @TableId(type = IdType.AUTO)
    private Long atid;

    /**
     * 资产类型名称
     */
    private String atname;

    /**
     * 父级id
     */
    private Long parentid;

    /**
     * 资产数量
     */
    private Integer atsum;

    public Long getAtid() {
        return atid;
    }

    public void setAtid(Long atid) {
        this.atid = atid;
    }

    public String getAtname() {
        return atname;
    }

    public void setAtname(String atname) {
        this.atname = atname;
    }

    public Long getParentid() {
        return parentid;
    }

    public void setParentid(Long parentid) {
        this.parentid = parentid;
    }

    public Integer getAtsum() {
        return atsum;
    }

    public void setAtsum(Integer atsum) {
        this.atsum = atsum;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TAssettype other = (TAssettype) that;
        return (this.getAtid() == null ? other.getAtid() == null : this.getAtid().equals(other.getAtid()))
            && (this.getAtname() == null ? other.getAtname() == null : this.getAtname().equals(other.getAtname()))
            && (this.getParentid() == null ? other.getParentid() == null : this.getParentid().equals(other.getParentid()))
            && (this.getAtsum() == null ? other.getAtsum() == null : this.getAtsum().equals(other.getAtsum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAtid() == null) ? 0 : getAtid().hashCode());
        result = prime * result + ((getAtname() == null) ? 0 : getAtname().hashCode());
        result = prime * result + ((getParentid() == null) ? 0 : getParentid().hashCode());
        result = prime * result + ((getAtsum() == null) ? 0 : getAtsum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", atid=").append(atid);
        sb.append(", atname=").append(atname);
        sb.append(", parentid=").append(parentid);
        sb.append(", atsum=").append(atsum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}